$(function(){
	var swiper=new Swiper('.swiper-container',{
        pagination:'.swiper-pagination',
        paginationClickable:true,
		spaceBetween:30,
		loop:true,
		autoplay:3000
    });
    $(".bangdan_c li:odd").css('background-color','#e1e1e1');
    $(".search_hl").click(function(event){
    	var search =$(".search");
    	search.animate({top:0},250)
    });
    $(".xbtn").click(function(event){
    	var search=$(".search")
    	search.animate({top:"-120%"},250)
    });
    $(".product_c li:odd,.zizhi_con:odd").css('margin-left','10%');
	$('.htop').click(function(){
		$('body,html').animate({scrollTop:0},500)
	});
	var w_height=$(window).height();
	function scrollToTop(){
		if($(window).scrollTop() > w_height){
			$(".htop").show();
		}else{
			$(".htop").hide();
		}	
	}
	scrollToTop();
	$(window).scroll(function(){
		scrollToTop();
	});
	scrolling("n_con","n1p","n2p");
})
function scrolling(a,b,c){
	var speedp=30;
	var tabp=document.getElementById(a);
	var tab1p=document.getElementById(b);
	var tab2p=document.getElementById(c);
	if(tabp&&tab1p&&tab2p){
		tab2p.innerHTML=tab1p.innerHTML;
		function Marqueep(){
			if(tab2p.offsetWidth-tabp.scrollLeft<=0)
				tabp.scrollLeft-=tab1p.offsetWidth
			else{
				tabp.scrollLeft++;
			}
		}
		var MyMarp=setInterval(Marqueep,speedp);
		tabp.onmouseover=function(){clearInterval(MyMarp);};
		tabp.onmouseout=function(){MyMarp=setInterval(Marqueep,speedp);};
	}
}